package com.thrd.taiexhibition.presener;

import com.thrd.taiexhibition.bean.BeanCityIndustryDetailCompanyData;
import com.thrd.taiexhibition.callback.MvpCallback;
import com.thrd.taiexhibition.model.CityIndustryDetailCompanyModel;
import com.thrd.taiexhibition.view.CityIndustryDetailCompanyView;

/**
 * @author: ${唐杰}
 * @date: 2021/3/29
 */
public class CityIndustryDetailCompanyPresener {

    private CityIndustryDetailCompanyModel mCityIndustryDetailCompanyModel;
    private CityIndustryDetailCompanyView mCityIndustryDetailCompanyView;

    public CityIndustryDetailCompanyPresener(CityIndustryDetailCompanyView mCityIndustryDetailCompanyView){
        this.mCityIndustryDetailCompanyView=mCityIndustryDetailCompanyView;
        this.mCityIndustryDetailCompanyModel=new CityIndustryDetailCompanyModel();
    }

    public void getCityFocusData(long cityId){
        mCityIndustryDetailCompanyModel.getCityIndustryDetailCompanyModel(cityId, new MvpCallback<BeanCityIndustryDetailCompanyData>() {
            @Override
            public void onSuccess(BeanCityIndustryDetailCompanyData mCompanyList) {
                mCityIndustryDetailCompanyView.onSuccess(mCompanyList);
            }

            @Override
            public void onFailed(String e, int code) {
                mCityIndustryDetailCompanyView.onError(e,code);
            }
        });
    }
}
